<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/common/includes.jsp"%>
<!DOCTYPE html>
<html>
<head>
<title>zzzzzz - Settings</title>
<%@ include file="/WEB-INF/common/meta.jsp"%>
<%@ include file="/WEB-INF/common/global_res.jsp"%>
<script type="text/javascript"
	src="${ctx}/res/jquery/validate/jquery.validate.min.js"></script>
<script type="text/javascript"
	src="${ctx}/res/jquery/validate/messages_zh_CN.js"></script>
<script type="text/javascript">
	$('#editEmailForm').validate(
			{
				rules : {
					username : {
						required : true,
						minlength : 2
					}
				},
				highlight : function(label) {
					$(label).closest('.control-group').addClass('error');
				},
				success : function(label) {
					label.text('OK!').addClass('valid').closest('.control-group').addClass('success');
				}
			});
</script>
</head>
<body>

	<%@ include file="/WEB-INF/common/header.jsp"%>

	<div class="container">
		<div id="settings" class="row">
			<div class="span1">&nbsp;</div>
			<div class="span10">
				<div class="tabbable tabs-left">
					<%@ include file="menu.jsp"%>
					<div class="tab-content">
						<div class="row-fluid">
							<div class="span8">
								<c:if test="${not empty message}">
									<div class="${message.type.cssClass}">${message.text}</div>
								</c:if>
								<form:form modelAttribute="editProfileForm" id="editProfileForm" action="${ctx}/account/settings/profile" method="post" class="form-horizontal">
									<form:errors path="*" element="div" cssClass="msg-error" />
									<legend>
										<small>修改帐号基本信息</small>
									</legend>
									<fieldset>
										<div class="control-group">
											<form:label path="username" cssClass="control-label">名号</form:label>
											<div class="controls">
												<form:input path="username" cssClass="input-large" placeholder="您的名号" />
												<form:errors path="username" cssClass="text-error" />
											</div>
										</div>
										<div class="control-group">
											<form:label path="website" cssClass="control-label">我的域名</form:label>
											<div class="controls">
												<form:input path="website" cssClass="input-large" placeholder="您在u-er的唯一域名" />
												<form:errors path="website" cssClass="text-error" />
											</div>
										</div>
										<div class="control-group">
											<label for="thumbnail" class="control-label">头像</label>
											<div class="controls">
												<c:choose>
													<c:when test="${currentUser.picSet == false}">
														<img src="${ctx}/res/imgs/default_portrait.png" class="ui-inline-block ui-inline-block-middle thumb thumb_60" />
													</c:when>
													<c:otherwise>
														<c:url var="profilePicUrl" value="/img/u/n/${currentUser.id}.jpg" />
														<img src="${profilePicUrl}" class="ui-inline-block ui-inline-block-middle thumb thumb_60" />
													</c:otherwise>
												</c:choose>
												<a href="${ctx}/account/settings/portrait" class="mlm ui-inline-block-bottom">修改头像</a>
											</div>
										</div>
										<div class="control-group">
											<form:label path="aboutMe" cssClass="control-label">关于我</form:label>
											<div class="controls">
												<form:textarea path="aboutMe" cssClass="input-large" placeholder="aboutMe" cssStyle="width:300px; height:200px;" />
												<form:errors path="aboutMe" cssClass="text-error" />
											</div>
										</div>
										<div class="control-group">
											<div class="controls">
												<input type="submit" value="保存修改" class="btn" />
											</div>
										</div>
									</fieldset>
								</form:form>
							</div>
							<div class="span4 well" style="margin-top: 20px;">
								<p>在这里您可以修改您的邮箱和用户名</p>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="span1">&nbsp;</div>
		</div>
	</div>

	<script type="text/javascript">
		
	</script>

	<%@ include file="/WEB-INF/common/footer.jsp"%>

</body>
</html>